﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace UofCASE.AgileProductLinerDSL.Nant.Tasks.Models
{
    public class TestKey : ITestKey
    {
        public string TestName { get; private set; }
        public FileInfo id;

        public TestKey(FileInfo info)
        {
            id = info;
            TestName = info.Name;
        }

        public bool Matches(ITest test)
        {
            Test t = test as Test;
            if (t != null)
            {
                return t.TestFile.FullName.Equals(id.FullName);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return id.FullName.GetHashCode();
        }

        
    }
}
